// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Surveys API Version v2
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href=''>Surveys API</a>
 *      <tr><th>API Version<td>v2
 *      <tr><th>API Rev<td>20161103 (672)
 *      <tr><th>API Docs
 *          <td><a href=''>
 *              </a>
 *      <tr><th>Discovery Name<td>surveys
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Surveys API can be found at
 * <a href=''></a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Surveys.v2
{
    /// <summary>The Surveys Service.</summary>
    public class SurveysService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v2";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public SurveysService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public SurveysService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            mobileapppanels = new MobileapppanelsResource(this);
            results = new ResultsResource(this);
            surveys = new SurveysResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "surveys"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/surveys/v2/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "surveys/v2/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Surveys API.</summary>
        public class Scope
        {
            /// <summary>View and manage your surveys and results</summary>
            public static string Surveys = "https://www.googleapis.com/auth/surveys";

            /// <summary>View your surveys and survey results</summary>
            public static string SurveysReadonly = "https://www.googleapis.com/auth/surveys.readonly";

            /// <summary>View your email address</summary>
            public static string UserinfoEmail = "https://www.googleapis.com/auth/userinfo.email";

        }



        private readonly MobileapppanelsResource mobileapppanels;

        /// <summary>Gets the Mobileapppanels resource.</summary>
        public virtual MobileapppanelsResource Mobileapppanels
        {
            get { return mobileapppanels; }
        }

        private readonly ResultsResource results;

        /// <summary>Gets the Results resource.</summary>
        public virtual ResultsResource Results
        {
            get { return results; }
        }

        private readonly SurveysResource surveys;

        /// <summary>Gets the Surveys resource.</summary>
        public virtual SurveysResource Surveys
        {
            get { return surveys; }
        }
    }

    ///<summary>A base abstract class for Surveys requests.</summary>
    public abstract class SurveysBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new SurveysBaseServiceRequest instance.</summary>
        protected SurveysBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Surveys parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "mobileapppanels" collection of methods.</summary>
    public class MobileapppanelsResource
    {
        private const string Resource = "mobileapppanels";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public MobileapppanelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves a MobileAppPanel that is available to the authenticated user.</summary>
        /// <param name="panelId">External URL ID for the panel.</param>
        public virtual GetRequest Get(string panelId)
        {
            return new GetRequest(service, panelId);
        }

        /// <summary>Retrieves a MobileAppPanel that is available to the authenticated user.</summary>
        public class GetRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.MobileAppPanel>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string panelId)
                : base(service)
            {
                PanelId = panelId;
                InitParameters();
            }


            /// <summary>External URL ID for the panel.</summary>
            [Google.Apis.Util.RequestParameterAttribute("panelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PanelId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "mobileAppPanels/{panelId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "panelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "panelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists the MobileAppPanels available to the authenticated user.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists the MobileAppPanels available to the authenticated user.</summary>
        public class ListRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.MobileAppPanelsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }



            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }


            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartIndex { get; set; }


            [Google.Apis.Util.RequestParameterAttribute("token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Token { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "mobileAppPanels"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "token", new Google.Apis.Discovery.Parameter
                    {
                        Name = "token",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a MobileAppPanel. Currently the only property that can be updated is the owners
        /// property.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="panelId">External URL ID for the panel.</param>
        public virtual UpdateRequest Update(Google.Apis.Surveys.v2.Data.MobileAppPanel body, string panelId)
        {
            return new UpdateRequest(service, body, panelId);
        }

        /// <summary>Updates a MobileAppPanel. Currently the only property that can be updated is the owners
        /// property.</summary>
        public class UpdateRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.MobileAppPanel>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Surveys.v2.Data.MobileAppPanel body, string panelId)
                : base(service)
            {
                PanelId = panelId;
                Body = body;
                InitParameters();
            }


            /// <summary>External URL ID for the panel.</summary>
            [Google.Apis.Util.RequestParameterAttribute("panelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PanelId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Surveys.v2.Data.MobileAppPanel Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "mobileAppPanels/{panelId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "panelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "panelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "results" collection of methods.</summary>
    public class ResultsResource
    {
        private const string Resource = "results";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ResultsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Retrieves any survey results that have been produced so far. Results are formatted as an Excel
        /// file. You must add "?alt=media" to the URL as an argument to get results.</summary>
        /// <param name="surveyUrlId">External URL ID for the survey.</param>
        public virtual GetRequest Get(string surveyUrlId)
        {
            return new GetRequest(service, surveyUrlId);
        }

        /// <summary>Retrieves any survey results that have been produced so far. Results are formatted as an Excel
        /// file. You must add "?alt=media" to the URL as an argument to get results.</summary>
        public class GetRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.SurveyResults>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string surveyUrlId)
                : base(service)
            {
                SurveyUrlId = surveyUrlId;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>External URL ID for the survey.</summary>
            [Google.Apis.Util.RequestParameterAttribute("surveyUrlId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SurveyUrlId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{surveyUrlId}/results"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "surveyUrlId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "surveyUrlId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }
    }

    /// <summary>The "surveys" collection of methods.</summary>
    public class SurveysResource
    {
        private const string Resource = "surveys";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public SurveysResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Removes a survey from view in all user GET requests.</summary>
        /// <param name="surveyUrlId">External URL ID for the survey.</param>
        public virtual DeleteRequest Delete(string surveyUrlId)
        {
            return new DeleteRequest(service, surveyUrlId);
        }

        /// <summary>Removes a survey from view in all user GET requests.</summary>
        public class DeleteRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.SurveysDeleteResponse>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, string surveyUrlId)
                : base(service)
            {
                SurveyUrlId = surveyUrlId;
                InitParameters();
            }


            /// <summary>External URL ID for the survey.</summary>
            [Google.Apis.Util.RequestParameterAttribute("surveyUrlId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SurveyUrlId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "DELETE"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{surveyUrlId}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "surveyUrlId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "surveyUrlId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Retrieves information about the specified survey.</summary>
        /// <param name="surveyUrlId">External URL ID for the survey.</param>
        public virtual GetRequest Get(string surveyUrlId)
        {
            return new GetRequest(service, surveyUrlId);
        }

        /// <summary>Retrieves information about the specified survey.</summary>
        public class GetRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.Survey>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string surveyUrlId)
                : base(service)
            {
                SurveyUrlId = surveyUrlId;
                InitParameters();
            }


            /// <summary>External URL ID for the survey.</summary>
            [Google.Apis.Util.RequestParameterAttribute("surveyUrlId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SurveyUrlId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{surveyUrlId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "surveyUrlId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "surveyUrlId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Creates a survey.</summary>
        /// <param name="body">The body of the request.</param>
        public virtual InsertRequest Insert(Google.Apis.Surveys.v2.Data.Survey body)
        {
            return new InsertRequest(service, body);
        }

        /// <summary>Creates a survey.</summary>
        public class InsertRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.Survey>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Surveys.v2.Data.Survey body)
                : base(service)
            {
                Body = body;
                InitParameters();
            }



            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Surveys.v2.Data.Survey Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

            }

        }

        /// <summary>Lists the surveys owned by the authenticated user.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>Lists the surveys owned by the authenticated user.</summary>
        public class ListRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.SurveysListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }



            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> MaxResults { get; set; }


            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<long> StartIndex { get; set; }


            [Google.Apis.Util.RequestParameterAttribute("token", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Token { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "token", new Google.Apis.Discovery.Parameter
                    {
                        Name = "token",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Begins running a survey.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="resourceId"></param>
        public virtual StartRequest Start(Google.Apis.Surveys.v2.Data.SurveysStartRequest body, string resourceId)
        {
            return new StartRequest(service, body, resourceId);
        }

        /// <summary>Begins running a survey.</summary>
        public class StartRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.SurveysStartResponse>
        {
            /// <summary>Constructs a new Start request.</summary>
            public StartRequest(Google.Apis.Services.IClientService service, Google.Apis.Surveys.v2.Data.SurveysStartRequest body, string resourceId)
                : base(service)
            {
                ResourceId = resourceId;
                Body = body;
                InitParameters();
            }



            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Surveys.v2.Data.SurveysStartRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "start"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{resourceId}/start"; }
            }

            /// <summary>Initializes Start parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Stops a running survey.</summary>
        /// <param name="resourceId"></param>
        public virtual StopRequest Stop(string resourceId)
        {
            return new StopRequest(service, resourceId);
        }

        /// <summary>Stops a running survey.</summary>
        public class StopRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.SurveysStopResponse>
        {
            /// <summary>Constructs a new Stop request.</summary>
            public StopRequest(Google.Apis.Services.IClientService service, string resourceId)
                : base(service)
            {
                ResourceId = resourceId;
                InitParameters();
            }



            [Google.Apis.Util.RequestParameterAttribute("resourceId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ResourceId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "stop"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{resourceId}/stop"; }
            }

            /// <summary>Initializes Stop parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "resourceId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "resourceId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Updates a survey. Currently the only property that can be updated is the owners property.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="surveyUrlId">External URL ID for the survey.</param>
        public virtual UpdateRequest Update(Google.Apis.Surveys.v2.Data.Survey body, string surveyUrlId)
        {
            return new UpdateRequest(service, body, surveyUrlId);
        }

        /// <summary>Updates a survey. Currently the only property that can be updated is the owners property.</summary>
        public class UpdateRequest : SurveysBaseServiceRequest<Google.Apis.Surveys.v2.Data.Survey>
        {
            /// <summary>Constructs a new Update request.</summary>
            public UpdateRequest(Google.Apis.Services.IClientService service, Google.Apis.Surveys.v2.Data.Survey body, string surveyUrlId)
                : base(service)
            {
                SurveyUrlId = surveyUrlId;
                Body = body;
                InitParameters();
            }


            /// <summary>External URL ID for the survey.</summary>
            [Google.Apis.Util.RequestParameterAttribute("surveyUrlId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SurveyUrlId { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Surveys.v2.Data.Survey Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "update"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "PUT"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "surveys/{surveyUrlId}"; }
            }

            /// <summary>Initializes Update parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "surveyUrlId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "surveyUrlId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Surveys.v2.Data
{    

    public class FieldMask : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("fields")]
        public virtual System.Collections.Generic.IList<FieldMask> Fields { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual System.Nullable<int> Id { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Representation of an individual pre-defined panel object defining a targeted audience of opinion
    /// rewards mobile app users.</summary>
    public class MobileAppPanel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Country code for the country of the users that the panel contains. Uses standard ISO 3166-1
        /// 2-character language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom. Any
        /// survey created targeting this panel must also target the corresponding country.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Whether or not the panel is accessible to all API users.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("isPublicPanel")]
        public virtual System.Nullable<bool> IsPublicPanel { get; set; } 

        /// <summary>Language code that the panel can target. For instance, 'en-US'. Uses standard BCP47 language codes.
        /// See specification. Any survey created targeting this panel must also target the corresponding
        /// language.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("language")]
        public virtual string Language { get; set; } 

        /// <summary>Unique panel ID string. This corresponds to the mobile_app_panel_id used in Survey Insert
        /// requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mobileAppPanelId")]
        public virtual string MobileAppPanelId { get; set; } 

        /// <summary>Human readable name of the audience panel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>List of email addresses for users who can target members of this panel. Must contain at least the
        /// address of the user making the API call for panels that are not public. This field will be empty for public
        /// panels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("owners")]
        public virtual System.Collections.Generic.IList<string> Owners { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class MobileAppPanelsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("pageInfo")]
        public virtual PageInfo PageInfo { get; set; } 

        /// <summary>Unique request ID used for logging and debugging. Please include in any error reporting or
        /// troubleshooting requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>An individual predefined panel of Opinion Rewards mobile users.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resources")]
        public virtual System.Collections.Generic.IList<MobileAppPanel> Resources { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("tokenPagination")]
        public virtual TokenPagination TokenPagination { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class PageInfo : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("resultPerPage")]
        public virtual System.Nullable<int> ResultPerPage { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("startIndex")]
        public virtual System.Nullable<int> StartIndex { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("totalResults")]
        public virtual System.Nullable<int> TotalResults { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ResultsGetRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("resultMask")]
        public virtual ResultsMask ResultMask { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ResultsMask : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("fields")]
        public virtual System.Collections.Generic.IList<FieldMask> Fields { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("projection")]
        public virtual string Projection { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Representation of an individual survey object.</summary>
    public class Survey : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Targeting-criteria message containing demographic information</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("audience")]
        public virtual SurveyAudience Audience { get; set; } 

        /// <summary>Cost to run the survey and collect the necessary number of responses.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cost")]
        public virtual SurveyCost Cost { get; set; } 

        /// <summary>Additional information to store on behalf of the API consumer and associate with this question.
        /// This binary blob is treated as opaque. This field is limited to 64K bytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customerData")]
        public virtual string CustomerData { get; set; } 

        /// <summary>Text description of the survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>List of email addresses for survey owners. Must contain at least the address of the user making the
        /// API call.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("owners")]
        public virtual System.Collections.Generic.IList<string> Owners { get; set; } 

        /// <summary>List of questions defining the survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("questions")]
        public virtual System.Collections.Generic.IList<SurveyQuestion> Questions { get; set; } 

        /// <summary>Reason for the survey being rejected. Only present if the survey state is rejected.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rejectionReason")]
        public virtual SurveyRejection RejectionReason { get; set; } 

        /// <summary>State that the survey is in.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>Unique survey ID, that is viewable in the URL of the Survey Creator UI</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("surveyUrlId")]
        public virtual string SurveyUrlId { get; set; } 

        /// <summary>Optional name that will be given to the survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("title")]
        public virtual string Title { get; set; } 

        /// <summary>Number of responses desired for the survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("wantedResponseCount")]
        public virtual System.Nullable<int> WantedResponseCount { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Specifications for the target audience of a survey run through the API.</summary>
    public class SurveyAudience : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Optional list of age buckets to target. Supported age buckets are: ['18-24', '25-34', '35-44',
        /// '45-54', '55-64', '65+']</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ages")]
        public virtual System.Collections.Generic.IList<string> Ages { get; set; } 

        /// <summary>Required country code that surveys should be targeted to. Accepts standard ISO 3166-1 2 character
        /// language codes. For instance, 'US' for the United States, and 'GB' for the United Kingdom.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("country")]
        public virtual string Country { get; set; } 

        /// <summary>Country subdivision (states/provinces/etc) that surveys should be targeted to. For all countries
        /// except GB, ISO-3166-2 subdivision code is required (eg. 'US-OH' for Ohio, United States). For GB, NUTS 1
        /// statistical region codes for the United Kingdom is required (eg. 'UK-UKC' for North East England).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("countrySubdivision")]
        public virtual string CountrySubdivision { get; set; } 

        /// <summary>Optional gender to target.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("gender")]
        public virtual string Gender { get; set; } 

        /// <summary>Language code that surveys should be targeted to. For instance, 'en-US'. Surveys may target
        /// bilingual users by specifying a list of language codes (for example, 'de' and 'en-US'). In that case, all
        /// languages will be used for targeting users but the survey content (which is displayed) must match the first
        /// language listed. Accepts standard BCP47 language codes. See specification.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("languages")]
        public virtual System.Collections.Generic.IList<string> Languages { get; set; } 

        /// <summary>Key for predefined panel that causes survey to be sent to a predefined set of Opinion Rewards App
        /// users. You must set PopulationSource to ANDROID_APP_PANEL to use this field.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mobileAppPanelId")]
        public virtual string MobileAppPanelId { get; set; } 

        /// <summary>Online population source where the respondents are sampled from.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("populationSource")]
        public virtual string PopulationSource { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Message defining the cost to run a given survey through API.</summary>
    public class SurveyCost : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Cost per survey response in nano units of the given currency. To get the total cost for a survey,
        /// multiply this value by wanted_response_count.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("costPerResponseNanos")]
        public virtual System.Nullable<long> CostPerResponseNanos { get; set; } 

        /// <summary>Currency code that the cost is given in.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("currencyCode")]
        public virtual string CurrencyCode { get; set; } 

        /// <summary>Threshold to start a survey automatically if the quoted price is at most this value. When a survey
        /// has a Screener (threshold) question, it must go through an incidence pricing test to determine the final
        /// cost per response. Typically you will have to make a followup call to start the survey giving the final
        /// computed cost per response. If the survey has no threshold_answers, setting this property will return an
        /// error. By specifying this property, you indicate the max price per response you are willing to pay in
        /// advance of the incidence test. If the price turns out to be lower than the specified value, the survey will
        /// begin immediately and you will be charged at the rate determined by the incidence pricing test. If the price
        /// turns out to be greater than the specified value the survey will not be started and you will instead be
        /// notified what price was determined by the incidence test. At that point, you must raise the value of this
        /// property to be greater than or equal to that cost before attempting to start the survey again. This will
        /// immediately start the survey as long the incidence test was run within the last 21 days.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxCostPerResponseNanos")]
        public virtual System.Nullable<long> MaxCostPerResponseNanos { get; set; } 

        /// <summary>Cost of survey in nano units of the given currency. DEPRECATED in favor of
        /// cost_per_response_nanos</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nanos")]
        public virtual System.Nullable<long> Nanos { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Message defining the question specifications.</summary>
    public class SurveyQuestion : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The randomization option for multiple choice and multi-select questions. If not specified, this
        /// option defaults to randomize.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("answerOrder")]
        public virtual string AnswerOrder { get; set; } 

        /// <summary>Required list of answer options for a question.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("answers")]
        public virtual System.Collections.Generic.IList<string> Answers { get; set; } 

        /// <summary>Option to allow open-ended text box for Single Answer and Multiple Answer question types. This can
        /// be used with SINGLE_ANSWER, SINGLE_ANSWER_WITH_IMAGE, MULTIPLE_ANSWERS, and MULTIPLE_ANSWERS_WITH_IMAGE
        /// question types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hasOther")]
        public virtual System.Nullable<bool> HasOther { get; set; } 

        /// <summary>For rating questions, the text for the higher end of the scale, such as 'Best'. For numeric
        /// questions, a string representing a floating-point that is the maximum allowed number for a
        /// response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("highValueLabel")]
        public virtual string HighValueLabel { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("images")]
        public virtual System.Collections.Generic.IList<SurveyQuestionImage> Images { get; set; } 

        /// <summary>Currently only support pinning an answer option to the last position.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lastAnswerPositionPinned")]
        public virtual System.Nullable<bool> LastAnswerPositionPinned { get; set; } 

        /// <summary>For rating questions, the text for the lower end of the scale, such as 'Worst'. For numeric
        /// questions, a string representing a floating-point that is the minimum allowed number for a
        /// response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("lowValueLabel")]
        public virtual string LowValueLabel { get; set; } 

        /// <summary>Option to force the user to pick one of the open text suggestions. This requires that suggestions
        /// are provided for this question.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mustPickSuggestion")]
        public virtual System.Nullable<bool> MustPickSuggestion { get; set; } 

        /// <summary>Number of stars to use for ratings questions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numStars")]
        public virtual string NumStars { get; set; } 

        /// <summary>Placeholder text for an open text question.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("openTextPlaceholder")]
        public virtual string OpenTextPlaceholder { get; set; } 

        /// <summary>A list of suggested answers for open text question auto-complete. This is only valid if
        /// single_line_response is true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("openTextSuggestions")]
        public virtual System.Collections.Generic.IList<string> OpenTextSuggestions { get; set; } 

        /// <summary>Required question text shown to the respondent.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("question")]
        public virtual string Question { get; set; } 

        /// <summary>Used by the Rating Scale with Text question type. This text goes along with the question field that
        /// is presented to the respondent, and is the actual text that the respondent is asked to rate.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sentimentText")]
        public virtual string SentimentText { get; set; } 

        /// <summary>Option to allow multiple line open text responses instead of a single line response. Note that we
        /// don't show auto-complete suggestions with multiple line responses.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("singleLineResponse")]
        public virtual System.Nullable<bool> SingleLineResponse { get; set; } 

        /// <summary>The threshold/screener answer options, which will screen a user into the rest of the survey. These
        /// will be a subset of the answer option strings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("thresholdAnswers")]
        public virtual System.Collections.Generic.IList<string> ThresholdAnswers { get; set; } 

        /// <summary>Required field defining the question type. For details about configuring different type of
        /// questions, consult the question configuration guide.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>Optional unit of measurement for display (for example: hours, people, miles).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unitOfMeasurementLabel")]
        public virtual string UnitOfMeasurementLabel { get; set; } 

        /// <summary>The YouTube video ID to be show in video questions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("videoId")]
        public virtual string VideoId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Container object for image data and alt_text.</summary>
    public class SurveyQuestionImage : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The alt text property used in image tags is required for all images.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("altText")]
        public virtual string AltText { get; set; } 

        /// <summary>Inline jpeg, gif, tiff, bmp, or png image raw bytes for an image question types.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("data")]
        public virtual string Data { get; set; } 

        /// <summary>The read-only URL for the hosted images.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("url")]
        public virtual string Url { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Message representing why the survey was rejected from review, if it was.</summary>
    public class SurveyRejection : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A human-readable explanation of what was wrong with the survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("explanation")]
        public virtual string Explanation { get; set; } 

        /// <summary>Which category of rejection this was. See the  Google Surveys Help Center for additional details on
        /// each category.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Reference to the current results for a given survey.</summary>
    public class SurveyResults : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Human readable string describing the status of the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>External survey ID as viewable by survey owners in the editor view.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("surveyUrlId")]
        public virtual string SurveyUrlId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SurveysDeleteResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique request ID used for logging and debugging. Please include in any error reporting or
        /// troubleshooting requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SurveysListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("pageInfo")]
        public virtual PageInfo PageInfo { get; set; } 

        /// <summary>Unique request ID used for logging and debugging. Please include in any error reporting or
        /// troubleshooting requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>An individual survey resource.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resources")]
        public virtual System.Collections.Generic.IList<Survey> Resources { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("tokenPagination")]
        public virtual TokenPagination TokenPagination { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SurveysStartRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Threshold to start a survey automically if the quoted prices is less than or equal to this value.
        /// See Survey.Cost for more details.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("maxCostPerResponseNanos")]
        public virtual System.Nullable<long> MaxCostPerResponseNanos { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SurveysStartResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique request ID used for logging and debugging. Please include in any error reporting or
        /// troubleshooting requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>Survey object containing the specification of the started Survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resource")]
        public virtual Survey Resource { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SurveysStopResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique request ID used for logging and debugging. Please include in any error reporting or
        /// troubleshooting requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requestId")]
        public virtual string RequestId { get; set; } 

        /// <summary>Survey object containing the specification of the stopped Survey.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resource")]
        public virtual Survey Resource { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class TokenPagination : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("previousPageToken")]
        public virtual string PreviousPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
